package com.example.springmvc3;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.sql.SQLOutput;

@SpringBootApplication
public class SpringMvc3Application {
    private static ObjectMapper objectMapper = new ObjectMapper();

    public static void main(String[] args) throws JsonProcessingException {
        SpringApplication.run(SpringMvc3Application.class, args);

        Student student = new Student(5,"zbx","123");
        String studentJson = objectMapper.writeValueAsString(student);
        System.out.println(studentJson);




    }

}
